<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">
    <ui:define name="head">
        <style type="text/css">
            .col-95 {
                width: 95%;
            }

            .col-5 {
                width: 5%;
            }

            .col-label {
                width: 150px;
                text-align: right;
            }

            .col-label2 {
                /*padding-left: 80px;*/
                width: 150px;
                text-align: right;
            }

            .col-input {
                /*width: 180px;*/
                /*text-align: left;*/
            }

            .col-qry1 {
                width: 80%;
            }
        </style>
        <script language="JavaScript" type="text/JavaScript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    event.keyCode = 9;
                }
            }
        </script>
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <h:form id="form">
                <p:focus for="voucherSn"/>
                <p:growl id="msgs" showDetail="true"/>
                <p:panel id="qryfields">
                    <h:panelGrid columns="2" cellspacing="5">

                        <h:panelGrid id="inputVchTxn" columns="4" cellspacing="5" cellpadding="0"
                                     columnClasses="col-label,col-input,col-label,col-input">
                            <h:outputLabel value="编号:" style="text-align: right;"/>
                            <p:inputText id="voucherSn" value="#{billPayAction.billNo}"
                                         required="true" requiredMessage="请输入缴款书编号！"/>

                        </h:panelGrid>
                        <h:panelGrid columns="2" cellspacing="5" cellpadding="0" style="margin-left: 300px;"
                                     width="10%">
                            <p:commandButton id="getbtn" style="width:100px;" value="查询"
                                             action="#{billPayAction.onQueryCancel}"
                                             ajax="true"
                                             update="actbtn,msgs,dataPanel">
                            </p:commandButton>
                            <p:commandButton id="actbtn" style="width:100px;" value="撤销缴款"
                                             disabled="#{!billPayAction.checkPassed}"
                                             action="#{billPayAction.onCancel}"
                                             ajax="true" update="actbtn,msgs">
                            </p:commandButton>
                        </h:panelGrid>
                    </h:panelGrid>
                </p:panel>
                <p:ajaxStatus style="height:18px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>
                <p:panel>
                    <h:panelGrid id="dataPanel" columns="1" style="width: 100%;">
                        <h:panelGrid columns="4" cellpadding="0" cellspacing="5" border="0" style="width:100%;"
                                     columnClasses="col-label, col-input, col-label, col-input, col-label, col-input">
                            <h:outputLabel value="缴款书ID:"/>
                            <h:outputText value="#{billPayAction.billInfo.chr_id}"/>
                            <h:outputLabel value="样式编码:"/>
                            <h:outputText value="#{billPayAction.billInfo.billtype_code}"/>
                            <h:outputLabel value="样式名称:"/>
                            <h:outputText value="#{billPayAction.billInfo.billtype_name}"/>
                            <h:outputLabel value="票号:"/>
                            <h:outputText value="#{billPayAction.billInfo.bill_no}"/>
                            <h:outputLabel value="金额:"/>
                            <h:outputText value="#{billPayAction.billMoney}"/>
                            <h:outputLabel value="年度:"/>
                            <h:outputText value="#{billPayAction.billInfo.set_year}"/>
                            <h:outputLabel value="收款柜员:"/>
                            <h:outputText value="#{billPayAction.billInfo.bank_user}"/>
                            <h:outputLabel value="收款时间:"/>
                            <h:outputText value="#{billPayAction.payDate}"/>
                        </h:panelGrid>
                        <p:separator/>
                    </h:panelGrid>
                </p:panel>
            </h:form>
        </div>
    </ui:define>
</ui:composition>